﻿<!DOCTYPE html>
<html>
<head>
  <title>Highlanders</title>
  <%= stylesheet_link_tag 'blueprint/screen', :media => "screen, projection" %>
  <%= stylesheet_link_tag 'blueprint/print', :media => "print" %>
  <!--[if lt IE8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif] -->
  <%= stylesheet_link_tag    "application" %>
  <%= javascript_include_tag "jquery", "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <div class="container">
    <div id="messagebox" class="span-24 first hide">
      <div class="notice"><%= notice %></div>
      <div class="error"><%= alert %></div>
    </div><!--id=messagebox-->
    <div id="header" class="span-24">
      <img src="assets/header_new.png"></img>
      <div id="logo" class="span-9 left first">
        <h1>Игра "Горцы"</h1>
      </div><!--id=logo-->
      <div id="header-widget" class="span-7 right last">
        <div style="width: 90%; height: 90%;">
          <% if user_signed_in? %>
              <li>                
                <%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
              </li>
              <% if current_user.role == :admin %>
                <li><a href="/admin/">Admin panel</a></li>
              <% end %>
            <% else %>
            <li>
                <%= link_to('Login', new_user_session_path, html_options = {:id => "login-link"} )%>
                <%= link_to('Register', new_registration_path(User), html_options = {:id => "register-link"} )%>
            </li>
          <% end %>
        </div>
      </div><!--id=header-widget-->

      <ul id="topmenu" class="span-24">
        <li><a href="/">Главная</a></li>
        <%=raw static_pages_list %>
      </ul><!--id=topmenu-->
    </div><!--id=header-->
    <div id="main" class="span-22 prepend-1 append-1 first last">
      <%= yield %>
      <div id="ads" class="span-21 prepend-1 first last">
        <div class="advert span-4">
          <img class="adv_img" src="/assets/ad125.gif">
        </div>
        <div class="advert span-4">
          <img class="adv_img" src="/assets/ad125.gif">
        </div>
        <div class="advert span-4">
          <img class="adv_img" src="/assets/ad125.gif">
        </div>
        <div class="advert span-4">
          <img class="adv_img" src="/assets/ad125.gif">
        </div>
        <div class="advert span-4">
          <img class="adv_img" src="/assets/ad125.gif">
        </div>
      </div><!--id=ads-->
    </div><!--id=main-->
  </div>
  <!--class=container-->
  <div id="footer"></div>
<!--id=footer-->
<div id="forms-storage" class="hide">
  <div id="login-form"><%= render :partial => 'forms/sign_in' %></div>
  <div id="register-form"><%= render :partial => 'forms/sign_up' %></div>
</div>
</body>
</html>

